<!--
  Generated template for the NewsPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-toolbar no-border-bottom color="gm-primary">
    <ion-title>财经速递</ion-title>

    <ion-buttons right>
      <button ion-button color="white" icon-left (click)="onFinanceCalendar()">
        <ion-icon name="calendar"></ion-icon>
        财经日历
      </button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-fab right bottom>
    <button ion-fab mini color="primary" (click)="onScrollTop()"><ion-icon name="arrow-round-up"></ion-icon></button>
  </ion-fab>

  <ion-refresher (ionRefresh)="onRefresh($event)">
    <ion-refresher-content
        pullingIcon="arrow-dropdown"
        pullingText="下拉开始刷新"
        refreshingSpinner="circles"
        refreshingText="数据正在载入">
    </ion-refresher-content>
  </ion-refresher>

  <ion-list>
    <div class="express-item" *ngFor="let express of express_list">
      <div class="date">
        <ion-icon name="ios-time-outline" color="primary"></ion-icon>
        &nbsp;{{express.updateTime}}
      </div>
      <div *ngIf="express.hxsdType == '2'">
        <ion-icon [name]="getItemStarStyle(express.star >= 1)" color="rating" small></ion-icon>
        <ion-icon [name]="getItemStarStyle(express.star >= 2)" color="rating" small></ion-icon>
        <ion-icon [name]="getItemStarStyle(express.star >= 3)" color="rating" small></ion-icon>
      </div>
      <div [innerHTML]="express.title"></div>
      <div class="detail" *ngIf="express.hxsdType == '2'">
        <div>
          <div class="title">前&emsp;值:&emsp;<span class="body">{{express.pre}}</span></div>
          <div class="title">预测值:&emsp;<span class="body">{{express.pred}}</span></div>
        </div>
        <div *ngIf="express.moreOrLess">
          <div *ngFor="let data of express.moreOrLess" [ngClass]="getItemPriceStyle(data.type)">{{data.value}}</div>
        </div>
        <div class="real-value">
          实际值:&nbsp;<span>{{express.cur}}</span>
        </div>
      </div>
    </div>
  </ion-list>

  <!--<ion-infinite-scroll (ionInfinite)="onInfinite($event)">
    <ion-infinite-scroll-content
        loadingSpinner="bubbles"
        loadingText="加载更多数据">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>-->
</ion-content>
